package com.aji.biomarker.service.impl;

import com.aji.biomarker.domain.Species;
import com.aji.biomarker.domain.dto.SpeciesDto;
import com.aji.biomarker.domain.dto.SpeciesOriginDto;
import com.aji.biomarker.mapper.SpeciesMapper;
import com.aji.biomarker.service.SpeciesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 82527
* @description 针对表【species(物种表)】的数据库操作Service实现
* @createDate 2024-05-14 18:49:46
*/
@Service
@RequiredArgsConstructor
public class SpeciesServiceImpl extends ServiceImpl<SpeciesMapper, Species> implements SpeciesService {
    private final SpeciesMapper speciesMapper;
    @Override
    public List<SpeciesDto> countBySpecies() {
        return speciesMapper.count();
    }
    @Override
    public List<SpeciesOriginDto> countBySpeciesOrigin() {
        return speciesMapper.countOrigin();
    }
}




